const CppExtension = require('cpp-extension');
const { parentPort, workerData } = require('worker_threads');

// 执行同步操作
CppExtension.DoLongTaskSync(workerData, (...payload: any) => {
    // 如果是线程的方式启动
    if (parentPort && parentPort.postMessage) {
        parentPort.postMessage(payload)
    }}
);
